import java.util.*;
public class Lab09Task01 {
public static void main(String[] args) {
Scanner kb= new Scanner(System.in);
int[] int_arr = new int[10];
int sum=0,i,count=0;
for(i=0;i<int_arr.length;i++) {
System.out.printf("Enter value#%d: ",i+1);
int_arr[i]=kb.nextInt();
if(int_arr[i]>0) {
sum+=int_arr[i];
count++;
}
}
if(count>1)
System.out.printf("%nSum of positive values = %d%nAvrage of positive values = %.2f%nThe indexes where positive elements apear are: ",sum,(double)sum/(double)count);
else if(count==1)
System.out.printf("%nSum of positive values = %d%nAvrage of positive values = %.2f%nThe indexes where positive elements apears is: ",sum,(double)sum);
else
System.out.print("\nThere are no positive values");
for(i=0;i<int_arr.length;i++) {
if(int_arr[i]>0)
System.out.print(i+" ");
}
kb.close();
}
}
